package com.service.Impl;

import com.entity.StudentEntity;
import com.mapper.StudentMapper;
import com.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author:Domen
 * @Date:2024/5/23 15:46
 */
@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;
    public int add(StudentEntity studentEntity) {
        int count = studentMapper.insert(studentEntity);
        return count;
    }

    public StudentEntity getById(Integer id) {
        return studentMapper.getById(id);
    }
}
